﻿using Castle.ActiveRecord;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OVS.Domain
{
    [ActiveRecord("users")]
    public class User : EntityBase
    {
        [Property(NotNull = true, Length = 16)]
        [Required(ErrorMessage = "请填写用户账号")]
        [Display(Name = "账号")]
        public string UserAccount { get; set; }

        [Property(NotNull = true, Length = 16)]
        [Required(ErrorMessage = "请填写密码")]
        [Display(Name = "密码")]
        public string Password { get; set; }

        [Property(Length = 16, NotNull = false)]
        [Display(Name = "用户名")]
        public string UserName { get; set; }

        [Property(NotNull =true,Length =2)]
        [Required(ErrorMessage ="请填用户级别")]
        [Display(Name ="用户级别")]
        public string UserScale { get; set; }
    }
}
